package com.sumer.psychology.comment.domain.model;

import com.sumer.psychology.common.domain.model.AbstractDomainEvent;
import com.sumer.psychology.common.domain.model.Author;

/**
 * 创建一个评论
 * <p/>
 * User: zhenguang.zhu
 * Date: 2014/8/12
 * Time: 14:00
 */
public class CommentCreatedEvent extends AbstractDomainEvent {
    private CommentId commentId;
    private CommentHost host;
    private String content;
    private Author author;
    private CommentType commentType;

    public CommentCreatedEvent(CommentId commentId, CommentHost host, String content, Author author, CommentType commentType) {
        super();
        this.commentId = commentId;
        this.host = host;
        this.content = content;
        this.author = authorFrom(author);
        this.commentType = commentType;
    }

    public CommentId commentId() {
        return commentId;
    }

    public CommentHost host() {
        return host;
    }

    public String content() {
        return content;
    }

    public Author author() {
        return author;
    }

    public CommentType commentType() {
        return commentType;
    }
}
